Ccay.Module.define("Ccay.example.ui.richselect",function(page,$S){
	//负责初始化
	page.ready=function(){
		$S("#richselect").ccayTab();
		$("#").ccayTip("<div><div class='div_green_font' style='padding-left: 0px;'>显示内容可传入html串</div></div>"); 
		var datas = [
	                 { value: 0, text: '我是键值0所指向的内容' },
	                 { value: 1, text: '我是键值1所指向的内容' },
	                 { value: 2, text: '我是键值2所指向的内容' },
	                 { value: 3, text: '我是键值3所指向的内容' },
	                 { value: 4, text: '我是键值4所指向的内容' },
	                 { value: 5, text: '我是键值5所指向的内容' },
	                 { value: 6, text: '我是键值6所指向的内容' },
	                 { value: 7, text: '我是键值7所指向的内容' }
	             ];
		//单选框初始化
		 $('#girdSelector').dropdown({showfirstItem:true}, datas);
		//多选框初始化
	     $('#doubleGridSelector').dropdown({multi:true}, datas);
	     
		var treeOp = {
				mode:'tree',
				op:{
					url:"services/manage/registry/list",
					setting:{
						expandLevel:"0"
				     }
				}
		};
		//tree型选择器初始化
		$('#ddlTree').dropdown({
			combo:true,
			valueField:"name",
			displayField:"name",
			richMode:treeOp
		});
		//多选树形选择器初始化
		$('#doubleTree').dropdown({
			combo:true,
			valueField:"name",
			displayField:"name",
			richMode:{
				width:280,
				height:380,
				url:"ccay/example/ui/dropdown/tree-dropdown.html"
			}
		}).manager().setValue("");
		//page选择器初始化
		$('#ddlPage,#ddlPage1').dropdown({
			onlyone:true,
			appendAfter:false,
			valueField:"id",
			displayField:"name",
			richMode:{
				width:600,
				height:450,
				url:"ccay/example/ui/dropdown/grid-ddl.html"
			}
		});
		$('#ddlPage').manager().setValue("-1","张三");
		$('#ddlPage1').manager().setValue("-2","李四");
		
		$('#ddlDialog').dropdown({
			valueField:"htmlAreaId",
			displayField:"name",
			richMode:{
				mode:'dialog',
				width:600,
				height:480,
				url:"ccay/example/ui/dropdown/grid-dialog.html"
			}
		}).manager().setValue("11236","11236");
	}
});